<?php

namespace App\Http\Controllers\Api;

use App\Http\Requests\Api\WithdrawRequest;
use App\Models\Wallet;
use App\Transformers\WalletTransformer;
use Illuminate\Http\Request;

class WalletsController extends Controller
{
    public function index()
    {
        $data = Wallet::where('user_id', $this->user->id)->first();

        if (!$data) {
            $this->response->error(trans('api.not_exists'), 200);
        }

        return $this->response->item($data, new WalletTransformer());
    }
}

